<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:a4j="http://richfaces.org/a4j"
                xmlns:rich="http://richfaces.org/rich">

    <script type="text/javascript">
            function jsUpdateAsset(){
                updateAsset();
            }
    </script>
    <h:form>
        <a4j:jsFunction name="updateAsset" render="assetTabPanel" actionListener="#{psnAsset.refresh}"/>
        <rich:tabPanel id="assetTabPanel" switchType="ajax">
            <rich:tab header="在用资产" contentClass="tab-content-hight">
                <h:panelGroup id="tableGroup">
                <rich:dataScroller for="uassetList" fastStep="3" render="tableGroup"/>
                <div style="width:750px;min-height: 200px;overflow: auto;">
                    <rich:dataTable style="width:1100px;margin-bottom: 5px;"
                                     rows="15"
                                     id="uassetList"
                                     value="#{psnAsset.usingList}"
                                     var="uasset"
                                     styleClass="stable"
                                     noDataLabel="无数据!">
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="资产编号"/>
                            </f:facet>
                            <h:outputText value="#{uasset.assetCode}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="资产名称"/>
                            </f:facet>
                            <h:outputText value="#{uasset.assetName}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="品牌"/>
                            </f:facet>
                            <h:outputText value="#{uasset.brand}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="规格型号"/>
                            </f:facet>
                            <h:outputText value="#{uasset.model}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="单价"/>
                            </f:facet>
                            <h:outputText value="#{uasset.price}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="购置日期"/>
                            </f:facet>
                            <h:outputText value="#{uasset.purchDate}">
                                <f:convertDateTime pattern="yyyy年MM月dd日" timeZone="GMT+8" locale="cn" />
                            </h:outputText>
                        </h:column>
                        <h:column rendered="false">
                            <f:facet name="header">
                                <h:outputText  value="厂商"/>
                            </f:facet>
                            <h:outputText value="#{uasset.manufacture}"/>
                        </h:column>
                        <h:column rendered="false">
                            <f:facet name="header">
                                <h:outputText  value="质保日期"/>
                            </f:facet>
                            <h:outputText value="#{uasset.shelfLife}">
                                <f:convertDateTime pattern="yyyy年MM月dd日" timeZone="GMT+8" locale="cn" />
                            </h:outputText>
                        </h:column>
                        <rich:column style="width:160px;">
                            <f:facet name="header">
                                <h:outputText  value="保管地点"/>
                            </f:facet>
                            <h:outputText value="#{uasset.place}"/>
                        </rich:column>
                        <rich:column>
                            <f:facet name="header">
                                <h:outputText  value="保管人"/>
                            </f:facet>
                            <h:outputText value="#{uasset.keeper.cpsn_name}"/>
                        </rich:column>
                        <rich:column>
                            <f:facet name="header">
                                <h:outputText  value="使用人"/>
                            </f:facet>
                            <h:outputText value="#{uasset.person.cpsn_name}"/>
                        </rich:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="使用状况"/>
                            </f:facet>
                            <h:outputText value="在用"  rendered="#{uasset.useStatus == '0'}"/>
                            <h:outputText value="报废"  rendered="#{uasset.useStatus == '1'}" style="color: blue;"/>
                            <h:outputText value="报损"  rendered="#{uasset.useStatus == '2'}" style="color: red;"/>
                            <h:outputText value="其他"  rendered="#{uasset.useStatus == '3'}" style="color: orange;"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="审核状态"/>
                            </f:facet>
                            <h:outputText value="审核中"  rendered="#{uasset.checkFlag == false}"/>
                            <h:outputText value="已审核"  rendered="#{uasset.checkFlag == true}" style="color:blue;"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="审核日期"/>
                            </f:facet>
                            <h:outputText value="#{uasset.auditDate}">
                                <f:convertDateTime pattern="yyyy年MM月dd日" timeZone="GMT+8" locale="cn" />
                            </h:outputText>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="备注"/>
                            </f:facet>
                            <h:outputText value="#{uasset.memo}"/>
                        </h:column>
                    </rich:dataTable>
            <rich:jQuery selector=".stable tr:odd" query="addClass('odd-row')" />
            <rich:jQuery selector=".stable tr:even" query="addClass('even-row')" />
            <rich:jQuery selector=".stable tr" event="mouseover" query="jQuery(this).addClass('active-row')" />
            <rich:jQuery selector=".stable tr" event="mouseout" query="jQuery(this).removeClass('active-row')" />
            <rich:jQuery selector=".stable tr" event="click" query="jQuery(this).addClass('click-row')"/>
            <rich:jQuery selector=".stable tr" event="click" query="jQuery('.stable tr').not(this).removeClass('click-row')"/>
                </div>
                </h:panelGroup>
            </rich:tab>
            <rich:tab header="报废资产" contentClass="tab-content-hight">
                <rich:dataScroller for="sassetList"/>
                <div style="width:750px;min-height: 200px;overflow: auto;">
                    <rich:dataTable style="width:1100px;margin-bottom: 5px;"
                                    rows="15"
                                    styleClass="stable"
                                     id="sassetList" value="#{psnAsset.scrappedList}" var="col"
                                     noDataLabel="无数据!">
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="资产编号"/>
                            </f:facet>
                            <h:outputText value="#{col.assetCode}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="资产名称"/>
                            </f:facet>
                            <h:outputText value="#{col.assetName}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="品牌"/>
                            </f:facet>
                            <h:outputText value="#{col.brand}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="规格型号"/>
                            </f:facet>
                            <h:outputText value="#{col.model}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="单价"/>
                            </f:facet>
                            <h:outputText value="#{col.price}"/>
                        </h:column>
                        <h:column rendered="false">
                            <f:facet name="header">
                                <h:outputText  value="厂商"/>
                            </f:facet>
                            <h:outputText value="#{col.manufacture}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="购置日期"/>
                            </f:facet>
                            <h:outputText value="#{col.purchDate}">
                                <f:convertDateTime pattern="yyyy年MM月dd日" timeZone="GMT+8" locale="cn" />
                            </h:outputText>
                        </h:column>
                        <h:column rendered="false">
                            <f:facet name="header">
                                <h:outputText  value="质保日期"/>
                            </f:facet>
                            <h:outputText value="#{col.shelfLife}">
                                <f:convertDateTime pattern="yyyy年MM月dd日" timeZone="GMT+8" locale="cn" />
                            </h:outputText>
                        </h:column>
                        <rich:column style="width:160px;">
                            <f:facet name="header">
                                <h:outputText  value="保管地点"/>
                            </f:facet>
                            <h:outputText value="#{col.place}"/>
                        </rich:column>
                        <rich:column>
                            <f:facet name="header">
                                <h:outputText  value="保管人"/>
                            </f:facet>
                            <h:outputText value="#{col.keeper.cpsn_name}"/>
                        </rich:column>
                        <rich:column>
                            <f:facet name="header">
                                <h:outputText  value="使用人"/>
                            </f:facet>
                            <h:outputText value="#{col.person.cpsn_name}"/>
                        </rich:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="使用状况"/>
                            </f:facet>
                            <h:outputText value="在用"  rendered="#{col.useStatus == '0'}"/>
                            <h:outputText value="报废"  rendered="#{col.useStatus == '1'}" style="color:blue;"/>
                            <h:outputText value="报损"  rendered="#{col.useStatus == '2'}" style="color:red;"/>
                            <h:outputText value="其他"  rendered="#{col.useStatus == '3'}" style="color:ccddff;"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="审核状态"/>
                            </f:facet>
                            <h:outputText value="审核中"  rendered="#{col.checkFlag == false}"/>
                            <h:outputText value="已审核"  rendered="#{col.checkFlag == true}" style="color:blue;"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="审核日期"/>
                            </f:facet>
                            <h:outputText value="#{col.auditDate}">
                                <f:convertDateTime pattern="yyyy年MM月dd日" timeZone="GMT+8" locale="cn" />
                            </h:outputText>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="备注"/>
                            </f:facet>
                            <h:outputText value="#{col.memo}"/>
                        </h:column>
                    </rich:dataTable>
            <rich:jQuery selector=".stable tr:odd" query="addClass('odd-row')" />
            <rich:jQuery selector=".stable tr:even" query="addClass('even-row')" />
            <rich:jQuery selector=".stable tr" event="mouseover" query="jQuery(this).addClass('active-row')" />
            <rich:jQuery selector=".stable tr" event="mouseout" query="jQuery(this).removeClass('active-row')" />
            <rich:jQuery selector=".stable tr" event="click" query="jQuery(this).addClass('click-row')"/>
            <rich:jQuery selector=".stable tr" event="click" query="jQuery('.stable tr').not(this).removeClass('click-row')"/>
                </div>
            </rich:tab>
            <rich:tab header="报损资产" contentClass="tab-content-hight">
                <rich:dataScroller for="lassetList"/>
                <div style="width:750px;min-height: 200px; overflow: auto;">
                    <rich:dataTable style="width:1100px;margin-bottom: 5px;"
                                    rows="15"
                                    styleClass="stable"
                                     id="lassetList" value="#{psnAsset.lostedList}" var="col"
                                     noDataLabel="无数据!">
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="资产编号"/>
                            </f:facet>
                            <h:outputText value="#{col.assetCode}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="资产名称"/>
                            </f:facet>
                            <h:outputText value="#{col.assetName}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="品牌"/>
                            </f:facet>
                            <h:outputText value="#{col.brand}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="规格型号"/>
                            </f:facet>
                            <h:outputText value="#{col.model}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="单价"/>
                            </f:facet>
                            <h:outputText value="#{col.price}"/>
                        </h:column>
                        <h:column rendered="false">
                            <f:facet name="header">
                                <h:outputText  value="厂商"/>
                            </f:facet>
                            <h:outputText value="#{col.manufacture}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="购置日期"/>
                            </f:facet>
                            <h:outputText value="#{col.purchDate}">
                                <f:convertDateTime pattern="yyyy年MM月dd日" timeZone="GMT+8" locale="cn" />
                            </h:outputText>
                        </h:column>
                        <h:column rendered="false">
                            <f:facet name="header">
                                <h:outputText  value="质保日期"/>
                            </f:facet>
                            <h:outputText value="#{col.shelfLife}">
                                <f:convertDateTime pattern="yyyy年MM月dd日" timeZone="GMT+8" locale="cn" />
                            </h:outputText>
                        </h:column>
                        <rich:column style="width:160px;">
                            <f:facet name="header">
                                <h:outputText  value="保管地点"/>
                            </f:facet>
                            <h:outputText value="#{col.place}"/>
                        </rich:column>
                        <rich:column>
                            <f:facet name="header">
                                <h:outputText  value="保管人"/>
                            </f:facet>
                            <h:outputText value="#{col.keeper.cpsn_name}"/>
                        </rich:column>
                        <rich:column>
                            <f:facet name="header">
                                <h:outputText  value="使用人"/>
                            </f:facet>
                            <h:outputText value="#{col.person.cpsn_name}"/>
                        </rich:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="使用状况"/>
                            </f:facet>
                            <h:outputText value="在用"  rendered="#{col.useStatus == '0'}"/>
                            <h:outputText value="报废"  rendered="#{col.useStatus == '1'}" style="color:blue;"/>
                            <h:outputText value="报损"  rendered="#{col.useStatus == '2'}" style="color:red;"/>
                            <h:outputText value="其他"  rendered="#{col.useStatus == '3'}" style="color:ccddff;"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="审核状态"/>
                            </f:facet>
                            <h:outputText value="审核中"  rendered="#{col.checkFlag == false}"/>
                            <h:outputText value="已审核"  rendered="#{col.checkFlag == true}" style="color:blue;"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="审核日期"/>
                            </f:facet>
                            <h:outputText value="#{col.auditDate}">
                                <f:convertDateTime pattern="yyyy年MM月dd日" timeZone="GMT+8" locale="cn" />
                            </h:outputText>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="备注"/>
                            </f:facet>
                            <h:outputText value="#{col.memo}"/>
                        </h:column>
                    </rich:dataTable>
            <rich:jQuery selector=".stable tr:odd" query="addClass('odd-row')" />
            <rich:jQuery selector=".stable tr:even" query="addClass('even-row')" />
            <rich:jQuery selector=".stable tr" event="mouseover" query="jQuery(this).addClass('active-row')" />
            <rich:jQuery selector=".stable tr" event="mouseout" query="jQuery(this).removeClass('active-row')" />
            <rich:jQuery selector=".stable tr" event="click" query="jQuery(this).addClass('click-row')"/>
            <rich:jQuery selector=".stable tr" event="click" query="jQuery('.stable tr').not(this).removeClass('click-row')"/>
                </div>
            </rich:tab>
            <rich:tab header="其他待定资产" contentClass="tab-content-hight">
                <rich:dataScroller for="oassetList"/>
                <div style="width:750px;min-height: 200px;overflow: auto;">
                    <rich:dataTable style="width:1100px;margin-bottom: 5px;"
                                    rows="15"
                                    styleClass="stable"
                                     id="oassetList" value="#{psnAsset.otherList}" var="col"
                                     noDataLabel="无数据!">
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="资产编号"/>
                            </f:facet>
                            <h:outputText value="#{col.assetCode}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="资产名称"/>
                            </f:facet>
                            <h:outputText value="#{col.assetName}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="品牌"/>
                            </f:facet>
                            <h:outputText value="#{col.brand}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="规格型号"/>
                            </f:facet>
                            <h:outputText value="#{col.model}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="单价"/>
                            </f:facet>
                            <h:outputText value="#{col.price}"/>
                        </h:column>
                        <h:column rendered="false">
                            <f:facet name="header">
                                <h:outputText  value="厂商"/>
                            </f:facet>
                            <h:outputText value="#{col.manufacture}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="购置日期"/>
                            </f:facet>
                            <h:outputText value="#{col.purchDate}">
                                <f:convertDateTime pattern="yyyy年MM月dd日" timeZone="GMT+8" locale="cn" />
                            </h:outputText>
                        </h:column>
                        <h:column rendered="false">
                            <f:facet name="header">
                                <h:outputText  value="质保日期"/>
                            </f:facet>
                            <h:outputText value="#{col.shelfLife}">
                                <f:convertDateTime pattern="yyyy年MM月dd日" timeZone="GMT+8" locale="cn" />
                            </h:outputText>
                        </h:column>
                        <rich:column style="width:160px;">
                            <f:facet name="header">
                                <h:outputText  value="保管地点"/>
                            </f:facet>
                            <h:outputText value="#{col.place}"/>
                        </rich:column>
                        <rich:column>
                            <f:facet name="header">
                                <h:outputText  value="保管人"/>
                            </f:facet>
                            <h:outputText value="#{col.keeper.cpsn_name}"/>
                        </rich:column>
                        <rich:column>
                            <f:facet name="header">
                                <h:outputText  value="使用人"/>
                            </f:facet>
                            <h:outputText value="#{col.person.cpsn_name}"/>
                        </rich:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="使用状况"/>
                            </f:facet>
                            <h:outputText value="在用"  rendered="#{col.useStatus == '0'}"/>
                            <h:outputText value="报废"  rendered="#{col.useStatus == '1'}" style="color:blue;"/>
                            <h:outputText value="报损"  rendered="#{col.useStatus == '2'}" style="color:red;"/>
                            <h:outputText value="其他"  rendered="#{col.useStatus == '3'}" style="color: ccddff;"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="审核状态"/>
                            </f:facet>
                            <h:outputText value="审核中"  rendered="#{col.checkFlag == false}"/>
                            <h:outputText value="已审核"  rendered="#{col.checkFlag == true}" style="color:blue;"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="审核日期"/>
                            </f:facet>
                            <h:outputText value="#{col.auditDate}">
                                <f:convertDateTime pattern="yyyy年MM月dd日" timeZone="GMT+8" locale="cn" />
                            </h:outputText>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText  value="备注"/>
                            </f:facet>
                            <h:outputText value="#{col.memo}"/>
                        </h:column>
                    </rich:dataTable>
            <rich:jQuery selector=".stable tr:odd" query="addClass('odd-row')" />
            <rich:jQuery selector=".stable tr:even" query="addClass('even-row')" />
            <rich:jQuery selector=".stable tr" event="mouseover" query="jQuery(this).addClass('active-row')" />
            <rich:jQuery selector=".stable tr" event="mouseout" query="jQuery(this).removeClass('active-row')" />
            <rich:jQuery selector=".stable tr" event="click" query="jQuery(this).addClass('click-row')"/>
            <rich:jQuery selector=".stable tr" event="click" query="jQuery('.stable tr').not(this).removeClass('click-row')"/>
                </div>
            </rich:tab>
        </rich:tabPanel>
    </h:form>
</ui:composition>
